package game.adm.entity;

import game.adm.dao.ConfigDAO;
import game.adm.dao.dto.ConfigDTO;
import game.adm.dao.factory.ConfigFactory;
import projectx.core.base.ProjectXSystemException;
import projectx.core.base.ProjectXUserException;

public class ConfigEntityManager {
	
	public static ConfigDTO getConfig() throws ProjectXSystemException,
			ProjectXUserException {
		ConfigFactory factory = ConfigFactory.getFactory();
		ConfigDAO dao = factory.getConfigDAO();
		return dao.getConfig();
	}
	
	public static boolean insert(ConfigDTO dto) throws ProjectXSystemException,
			ProjectXUserException {
		ConfigFactory factory = ConfigFactory.getFactory();
		ConfigDAO dao = factory.getConfigDAO();
		return dao.insert(dto);
	}

	public static boolean update(ConfigDTO dto) throws ProjectXSystemException,
			ProjectXUserException {
		ConfigFactory factory = ConfigFactory.getFactory();
		ConfigDAO dao = factory.getConfigDAO();
		return dao.update(dto);
	}
	
}
